'use strict';

/**
 * @ngdoc function
 * @name jgappApp.controller:TaskChoosedepsCtrl
 * @description
 * # TaskChoosedepsCtrl
 * Controller of the jgappApp
 */
angular.module('jgappApp')
    .controller('TaskChoosedepsCtrl', function(openApi, DataService, $location,$routeParams) {
        this.initData = function() {
            DataService.getData(openApi.getdepts).then(function(data) {
                this.deplist = data
            }.bind(this))
        }
        this.initData();
        this.gochoosepeople = function(item) {
            $location.path("task/choosepeople/"+$routeParams.from+"/" + item.value)
        }
    });
